﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PersonDetails.ascx.cs" Inherits="Share_PersonDetails" %>
 <%@ Register Assembly="jQueryDatePicker" Namespace="Westwind.Web.Controls" TagPrefix="ww" %>
Information Details
<hr />
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
    <asp:DataList ID="dtl_PersonDetails" runat="server" 
    oneditcommand="dtl_PersonDetails_EditCommand" Width="680px" 
    onupdatecommand="dtl_PersonDetails_UpdateCommand" 
    oncancelcommand="dtl_PersonDetails_CancelCommand">
        <ItemTemplate>            
            <div class="AccountInfo">
        <h1>UserID: </h1> <span><%#Eval("UserID") %></span><br />
        <h1>FullName:</h1> <span><%#Eval("FullName") %></span><br />
        <h1>Birthday:</h1> <span><%#Eval("BirthDay") %></span><br />
        <h1>Gender:</h1> <span><%#Eval("Gender") %></span><br />
         <h1>Address:</h1> <span><%#Eval("Address") %></span><br />
        <h1>Email:</h1> <span><%#Eval("Email") %></span><br />
        <h1>Phone:</h1> <span><%#Eval("Phone")%></span><br />
        <div class="cleaner"></div>
        <h1><asp:Label ID="lb_DateJoin" Visible="false" runat="server" Text="Date Join: "></asp:Label></h1>        
        <span><asp:Label ID="lb_DateJoin_Data" Visible="false" runat="server" Text='<%#Eval("DateJoin") %>'></asp:Label></span>
        <div class="cleaner"></div>
        <h1><asp:Label ID="lb_Class" runat="server" Visible="false"  Text="Class: "></asp:Label></h1>        
        <span><asp:Label ID="lb_Class_Data" runat="server" Visible="false"  Text='<%#Eval("st_Class") %>'></asp:Label></span>
        <div class="cleaner"></div>
        <h1><asp:Label ID="lb_Course" runat="server" Visible="false"  Text="Course: "></asp:Label></h1>
        <span><asp:Label ID="lb_Course_Data" runat="server" Visible="false"  Text='<%#Eval("Course") %>'></asp:Label></span>
        <div class="cleaner"></div>
        <h1><asp:Label ID="lb_Subject" runat="server" Visible="false"  Text="Subject: "></asp:Label></h1>
        <span><asp:Label ID="lb_Subject_Data" runat="server" Visible="false"  Text='<%#Eval("Subject") %>'></asp:Label></span><br />
        <asp:Button CommandName="Edit" ID="btnUpdate" Text="Update Information" runat="server"></asp:Button>
            <asp:Button ID="btn_HideDetail" runat="server" OnClick="Hidedetail" Text="Hide details" />        
        </ItemTemplate>

        <EditItemTemplate>
        <div id = "updateCompetion">                    
        <h1>UserID: </h1> <span><asp:Label ID="lb_UserID" runat="server" Text='<%#Eval("UserID") %>'></asp:Label></span>
        
        <br /> 
        <h1>FullName: </h1> <span><asp:TextBox ID="txtFullName" Text='<%#Eval("FullName") %>' runat="server"></asp:TextBox></span>
        <asp:RequiredFieldValidator ID="rqrFullName" runat="server" ErrorMessage="Required Field" ControlToValidate="txtFullName" ForeColor="Red" ValidationGroup="1"></asp:RequiredFieldValidator>
        <br />
        <h1>Birthday: </h1> <span> <ww:jQueryDatePicker runat="server"
                id="txtBirthday" Text='<%#Eval("Birthday","{0:MM/dd/yyyy}")%>'   DisplayMode="AutoPopup" DateFormat="MM/dd/yyyy"  ></ww:jQueryDatePicker></span>
        <asp:RequiredFieldValidator ID="rqrBirthday" runat="server" ErrorMessage="Required Field" ControlToValidate="txtBirthday" ForeColor="Red" ValidationGroup="1"></asp:RequiredFieldValidator>
        <br />
        <h1>Gender: </h1> <span><asp:TextBox ID="txtGender" Text='<%#Eval("Gender") %>' runat="server"></asp:TextBox></span>
        <asp:RequiredFieldValidator ID="rqrGender" runat="server" ErrorMessage="Required Field" ControlToValidate="txtGender" ForeColor="Red" ValidationGroup="1"></asp:RequiredFieldValidator>
        <br />
        <h1>Address: </h1> <span><asp:TextBox ID="txtAddress" Text='<%#Eval("Address") %>' runat="server"></asp:TextBox></span>
        <asp:RequiredFieldValidator ID="rqrAddress" runat="server" ErrorMessage="Required Field" ControlToValidate="txtAddress" ForeColor="Red" ValidationGroup="1"></asp:RequiredFieldValidator>
        <br />
        <h1>Email: </h1><span><asp:TextBox ID="txtEmail" Text='<%#Eval("Email") %>' runat="server"></asp:TextBox></span>
        <asp:RequiredFieldValidator ID="rqrEmail" runat="server" ErrorMessage="Required Field" ControlToValidate="txtEmail" ForeColor="Red" ValidationGroup="1"></asp:RequiredFieldValidator>
        <br />
        <h1>Phone: </h1><span><asp:TextBox ID="txtPhone" Text='<%#Eval("Phone")%>' runat="server"></asp:TextBox></span>
        <asp:RequiredFieldValidator ID="rqrPhone" runat="server" ErrorMessage="Required Field" ControlToValidate="txtPhone" ForeColor="Red" ValidationGroup="1"></asp:RequiredFieldValidator>
        <br />

        <h1><asp:Label ID="lb_DateJoin" Visible="false"  runat="server" Text="Date Join: "></asp:Label> </h1>        
        <span> <ww:jQueryDatePicker runat="server"
                id="txt_DateJoin_Data" Text='<%#Eval("DateJoin","{0:MM/dd/yyyy}")%>'   DisplayMode="AutoPopup" DateFormat="MM/dd/yyyy"  ></ww:jQueryDatePicker></span>
        <asp:RequiredFieldValidator ID="rqrDatejoin" runat="server" ErrorMessage="Required Field" ControlToValidate="txt_DateJoin_Data" ForeColor="Red" ValidationGroup="1" ></asp:RequiredFieldValidator>
        <div class="cleaner"></div>
        <h1><asp:Label ID="lb_Class"  Visible="false" runat="server" Text="Class: "></asp:Label></h1>
        <span><asp:TextBox ID="txt_Class_Data" Visible="false"  runat="server" Text='<%#Eval("st_Class") %>'></asp:TextBox></span>
        <asp:RequiredFieldValidator ID="rqrClass" runat="server" ErrorMessage="Required Field" ControlToValidate="txt_Class_Data" ForeColor="Red" ValidationGroup="1"></asp:RequiredFieldValidator>
        <div class="cleaner"></div>
        <h1><asp:Label ID="lb_Course" Visible="false"  runat="server" Text="Course: "></asp:Label></h1>
        <span><asp:TextBox ID="txt_Course_Data" Visible="false"  runat="server" Text='<%#Eval("Course") %>'></asp:TextBox></span>
        <asp:RequiredFieldValidator ID="rqrCourse" runat="server" ErrorMessage="Required Field" ControlToValidate="txt_Course_Data" ForeColor="Red" ValidationGroup="1"></asp:RequiredFieldValidator>
        <div class="cleaner"></div>
        <h1><asp:Label ID="lb_Subject"  Visible="false" runat="server" Text="Subject: "></asp:Label></h1>
        <span><asp:TextBox ID="txt_Subject_Data" Visible="false"  runat="server" Text='<%#Eval("Subject") %>'></asp:TextBox></span>
        <asp:RequiredFieldValidator ID="rqrSubject" runat="server" ErrorMessage="Required Field" ControlToValidate="txt_Subject_Data" ForeColor="Red" ValidationGroup="1"></asp:RequiredFieldValidator>
        <asp:Label ID="lblResult" runat="server"></asp:Label>
        <asp:Button CommandName="Update" ID="btnUpdate" Text="Update" runat="server" ValidationGroup="1"></asp:Button>
        <asp:Button CommandName="Cancel" ID="lbtnCancel" Text="Cancel" runat="server"></asp:Button>                    
                    </p>
               </div>
           </EditItemTemplate>
           
        </asp:DataList>